Auto-titrating non-invasive ventilation